package com.hlk.admin;

import com.hlk.pojo.bo.SaveFriendLinkBO;
import com.hlk.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Api(value = "首页友情链接维护", tags = {"首页友情链接维护controller"})
@RequestMapping("friendLinkMng")
public interface FriendLinkControllerApi {

    @ApiOperation(value = "新增或者修改友情链接")
    @PostMapping("saveOrUpdateFriendLink")
    Result saveOrUpdateFriendLink(
            @RequestBody @Valid SaveFriendLinkBO saveFriendLinkBO,
            BindingResult result);

    @ApiOperation(value = "查询友情链接列表")
    @PostMapping("getFriendLinkList")
    Result getFriendLinkList();

    @ApiOperation(value = "删除友情链接")
    @PostMapping("delete")
    Result delete(@RequestParam String linkId);

    /**
     * @return
     */
    @ApiOperation(value = "门户端查询友情链接列表")
    @GetMapping("portal/list")
    Result queryPortalAllFriendLinkList();
}
